<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ page isELIgnored="false"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!doctype html>
<html lang="zh-CN">
<head>
<meta content="initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no" name="viewport" />
<meta charset="utf-8">
<title>数据导出</title>
<style type="text/css">
</style>
</head>
<body>
	<textarea id="sqlInput" placeholder="输入Select ＳＱＬ语句，确保sql语句正确,最多导出1万数据" style="width: 100%; height: 300px;"></textarea>
	<button id="btnExport" style="margin-top: 10px;">导出Excel</button>
	<script type="text/javascript" src="static/jquery-1.11.0.js"></script>
	<script type="text/javascript">
		$(function() {
			$("#btnExport").click(function() {
				var sql = $("#sqlInput").val().trim();
				if (!sql) {
					$("#sqlInput").focus();
					return;
				} 
				window.open("data_export.htm?selectSql="+encodeURI(sql)); 
			});
		});
	</script>
</body>
</html>